/**
 * 
 */
package com.fashop.enabler.seguridad;

import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.util.EntityUtils;

import com.fashop.enumeration.HeaderApplicationEnum;

/**
 * @author Alan Dávila
 * e-mail ustargab@gmail.com
 * date 27/01/2014 23:30:13
 */
public class SecurityEnablerImpl implements SecurityEnabler {

	/* (non-Javadoc)
	 * @see com.fashop.enabler.seguridad.SecurityEnabler#checkEstado(java.lang.String)
	 */
	public String checkEstado(String usuario) {
		
		String estado = "";
//		final String cloudAccount = "https://account.lab.fi-ware.eu";
//		HttpResponse httpResponse = null;
//		DefaultHttpClient peticion = new DefaultHttpClient();
//		String stringEscape = "{}";
//		try {			
//			String auth = credenciales.get("auth");
//			String token = credenciales.get("token");
//			String url = repositorio + "/cdmi/" + auth + "/" + path;
//			HttpGet httpGet = new HttpGet(url);
//			httpGet.addHeader(HeaderApplicationEnum.XAUTHTOKEN.getValue(), token);
//			httpResponse = peticion.execute(httpGet);
//			stringEscape = EntityUtils.toString(httpResponse.getEntity());
//			String target = "\\\"";
//			String replacement = "";
//			stringEscape = stringEscape.replace(target, replacement);
//			stringEscape = stringEscape.substring(1);
//			stringEscape = stringEscape.substring(0, stringEscape.length() - 1);
//			Integer posicionInicial = stringEscape.indexOf("value:") + "value:".length();
//			imagen64 = stringEscape.substring(posicionInicial, stringEscape.length() - 1);
//		} catch (Exception e) {
//			LOGGER.error(e.getClass().toString() + ": No se ha podido ejecutar alguna petición");
//		}
		
		return estado;
	}

}
